use "Table_1_A8.dta",clear

global demo d11 d10 i.d7 d8 i.d15a_r2


*** TABLE 1 ***
reg sc_trust_eu  ib3.thirdnet_encoded $demo
outreg2 using Table_1, keep(2.thirdnet_encoded 4.thirdnet_encoded)  nonotes nocons replace ctitle(EU Trust) tex addtext(Controls , YES, )   
reg sc_eu_image  ib3.thirdnet_encoded $demo
outreg2 using Table_1, keep(2.thirdnet_encoded 4.thirdnet_encoded) nocons  ctitle(EU image) tex addtext(Controls , YES, ) 
reg sc_eu_protectiv  ib3.thirdnet_encoded $demo
outreg2 using Table_1, keep(2.thirdnet_encoded 4.thirdnet_encoded) nocons  ctitle(EU Protective) tex addtext(Controls , YES, ) 
reg sc_eu_efficient  ib3.thirdnet_encoded $demo
outreg2 using Table_1, keep(2.thirdnet_encoded 4.thirdnet_encoded) nocons ctitle(EU Efficient) tex addtext(Controls , YES, )
reg sc_eu_integr  ib3.thirdnet_encoded $demo
outreg2 using Table_1, keep(2.thirdnet_encoded 4.thirdnet_encoded) nocons ctitle(EU Integration) tex addtext(Controls , YES, )
reg sc_eu_attach  ib3.thirdnet_encoded $demo
outreg2 using Table_1, keep(2.thirdnet_encoded 4.thirdnet_encoded) nocons ctitle(EU Identity) tex addtext(Controls , YES, )
reg sc_eu_common  ib3.thirdnet_encoded $demo
outreg2 using Table_1, keep(2.thirdnet_encoded 4.thirdnet_encoded) nocons ctitle(EU Common) tex addtext(Controls , YES, ) 
reg sc_eu_speed  ib3.thirdnet_encoded $demo
outreg2 using Table_1, keep(2.thirdnet_encoded 4.thirdnet_encoded) nocons ctitle(EU Speed) tex addtext(Controls , YES, )
reg sc_nat_int_eu  ib3.thirdnet_encoded $demo
outreg2 using Table_1, keep(2.thirdnet_encoded 4.thirdnet_encoded) nocons ctitle(National Interest) tex addtext(Controls , YES, )

sutex sc_trust_eu sc_eu_image sc_eu_protectiv sc_eu_efficient sc_eu_integr sc_eu_attach sc_eu_common sc_eu_speed sc_nat_int_eu  d11 d10 d7 d8  d15a_r2    , lab nobs key(descstat) replace, 
		 



*** TABLE A8 ***
* source https://ec.europa.eu/regional_policy/policy/how/is-my-region-covered/2014-2020_en
gen convergence=0
replace convergence =1 if p7pt==4
replace convergence =1 if p7pt==2
replace convergence =1 if p7pt==1

replace convergence =1 if p7es ==10
replace convergence =1 if p7it_r1 ==4

replace convergence =1 if p7gr ==5
replace convergence =1 if p7gr ==2
replace convergence =1 if p7gr ==4
replace convergence =1 if p7gr ==6


preserve
keep if isocntry=="IT" | isocntry=="GR" | isocntry=="PT" | isocntry=="ES"
reg sc_trust_eu  i.convergence $demo 
outreg2 using Table_A8, keep(1.convergence)  nonotes nocons replace ctitle(EU Trust) tex addtext(Controls , YES, )   
reg sc_eu_image  i.convergence $demo
outreg2 using Table_A8, keep(1.convergence) nocons  ctitle(EU image) tex addtext(Controls , YES, ) 
reg sc_eu_protectiv  i.convergence $demo
outreg2 using Table_A8, keep(1.convergence) nocons  ctitle(EU Protective) tex addtext(Controls , YES, ) 
reg sc_eu_efficient  i.convergence $demo
outreg2 using Table_A8, keep(1.convergence) nocons ctitle(EU Efficient) tex addtext(Controls , YES, )
reg sc_eu_integr  i.convergence $demo
outreg2 using Table_A8, keep(1.convergence) nocons ctitle(EU Integration) tex addtext(Controls , YES, )
reg sc_eu_attach  i.convergence $demo
outreg2 using Table_A8, keep(1.convergence) nocons ctitle(EU Identity) tex addtext(Controls , YES, )
reg sc_eu_common  i.convergence $demo
outreg2 using Table_A8, keep(1.convergence) nocons ctitle(EU Common) tex addtext(Controls , YES, ) 
reg sc_eu_speed  i.convergence $demo
outreg2 using Table_A8, keep(1.convergence) nocons ctitle(EU Speed) tex addtext(Controls , YES, )
reg sc_nat_int_eu  i.convergence $demo
outreg2 using Table_A8, keep(1.convergence) nocons ctitle(National Interest) tex addtext(Controls , YES, )
restore
